<?php
session_start();
header('Content-Type:text/html;charset=utf-8');
require_once($_SERVER['DOCUMENT_ROOT'].'/public/func.php');
$config=require_once($_SERVER['DOCUMENT_ROOT'].'/public/config.php');
$_POST['mfile']=up('mfile');
//var_dump($_POST['pname']);die;
$arr=array('account'=>$_POST['account'],'pwd'=>$_POST['pwd'],'pname'=>$_POST['pname'],'email'=>$_POST['email'],'pname'=>$_POST['pname']);
$rec=add($config,'vip',$arr);
if($rec){
    echo "<script>alert('注册成功');window.location.href='/home/landing/index.php'</script>";
}else{
    echo "<script>alert('注册失败');window.location.href='/home/landing/registered/registered.php'</script>";
}
?>